﻿@model IEnumerable<Gfw.Web.Models.SystemUser.NewUserModel>
@{
    ViewBag.Title = "帐户列表";
    Layout = "~/Views/Shared/_Content.cshtml";
}
@using MvcContrib.UI.Grid;
@using C.Mvc;
<div>
    @using (Ajax.BeginForm("Index", "SystemUser", null, Gfw.Web.Common.ViewHelper.AjaxGet))
    {
      
        <p>
            @Ajax.ActionLink("添加人员", "Create", new { did = ViewBag.did }, Gfw.Web.Common.ViewHelper.AjaxGet)
        </p>
        @Html.Grid(Model).Columns(
            column =>
            {
                column.For(x => x.Name).Named("姓名");
                column.For(x => x.LoginName).Named("登录名");
                column.Custom(@<text>@if (item.IsLock == 0)
                                     {
                                         @Html.Label("正常");

                                     }
                                     else
                                     {
                                         @Html.Label("锁定");
                                     } </text>).Named("状态");
               // column.For(x => x.IsLock).Named("状态");
                column.Custom(@<text>
        @Ajax.ActionLink("修改", "Edit", new { id = item.Id }, Gfw.Web.Common.ViewHelper.AjaxGet)
        |
        @Ajax.ActionLink("删除", "Delete", new { id = item.Id }, new AjaxOptions()
   {
       UpdateTargetId = Gfw.Web.Common.ViewHelper.AjaxContainer,
       HttpMethod = "Post",
       InsertionMode = InsertionMode.Replace,
       Confirm = "确定要删除人员吗？"

   })
        </text>).Named("操作");

            }
                      ).Attributes(id => "mytable", cellpadding => "0", cellspacing => "0").Empty("没有相关信息");
@* @Ajax.DataGridPager().Totals(8).PageIndex(ViewBag.page).PagePropertyName("page").Model(new { did = ViewBag.did }).AjaxOptions(Gfw.Web.Common.ViewHelper.AjaxGet);*@
    }
</div>
